package com.yanqu.road.entity.cricket;

import com.yanqu.road.entity.DataObject;
import com.yanqu.road.entity.FieldTypeAnnotation;
import com.yanqu.road.utils.property.Property;

import java.util.ArrayList;
import java.util.List;
import java.util.Map;
import java.util.concurrent.ConcurrentHashMap;

/**
 * 蛐蛐系统用户数据
 */
public class UserCricketData extends DataObject {

    /**
     * 用户id
     */
    private long userId;

    /**
     * 累计抽取了多少次（次数可被消耗的）
     */
    private long catchEventTimes;

    /**
     * 累计抽取
     */
    private long totalCatchTimes;

    /**
     * 累计单抽次数
     */
    private long totalOneCatchTimes;

    /**
     * 累计十连抽次数
     */
    private long totalTenCatchTimes;

    /**
     * 待选择的蛐蛐列表
     */
    private List<Integer> cricketIdList = new ArrayList<>();


    /**
     * 徽章等级
     */
    private int badgeLevel;

    /**
     * 虫师积分
     */
    private long cricketScore;

    /**
     * 当前场景id
     */
    private int scenceId;

    /**
     * 场景信息
     */
    private Map<Integer, CricketScenceData> scenceDataMap = new ConcurrentHashMap<>();

    private Property items = new Property();

    /**
     * 当前赛季
     */
    private int currentSeasonId;

    /**
     * 排行积分
     */
    private long rankScore;

    /*
    当前赛季最高分数(废弃)
     */
    private long maxRankScore;

    /**
     * 防守失败分数，每天重置
     */
    private long defendFailScore;

    /**
     * 最后一次防守时间
     */
    private long lastDefendFailScoreTime;

    /**
     * 膜拜榜单轮次
     */
    private long worshipTime;

    /**
     * 剩余匹配次数(废弃)
     */
    private int remainMatchTimes;

    /**
     * 最后刷新的时间
     */
    private long lastMatchTime;

    private int totalMatchTimes;

    /**
     * 蛐蛐防守阵容
     */
    private CricketMatchData cricketMatchData = CricketMatchData.getInstance();

    /**
     * 本赛季是否引导过了
     */
    private int guide;

    /**
     * 蛐蛐绘卷数量(剩余的，升级可被消耗)
     */
    private long drawPieceCount;

    /**
     * 绘卷当前等级
     */
    private int drawLevel;

    /**
     * 绘卷领奖等级
     */
    private int drawRewardLevel;

    /**
     * 绘卷累积奖励
     */
    private Property drawReward = new Property();

    /**
     * 引导状态(按位记录)
     */
    private int guideBit;

    /**
     * 竞技场轮次
     * 用于重置
     */
    private int courtRound;

    /**
     * 竞技场勋章id
     */
    private int courtBadgeId;

    /**
     * 竞技场勋章经验
     */
    private long courtBadgeExp;

    /**
     * 购买白银战令
     */
    private int buySliverToken;

    /**
     * 购买黄金战令
     */
    private int buyGoldToken;

    /**
     * 战令经验
     */
    private long tokenExp;

    /**
     * 战令轮次(用于重置)
     */
    private int tokenRound;

    /**
     * 回收技能等级的操作时间
     */
    private long skillRecycleTime;

    /**
     * 是否查看晋级信息
     */
    private boolean showCourtRank;

    public UserCricketData() {

    }

    public long getUserId() {
        return userId;
    }

    public void setUserId(long userId) {
        if (this.userId != userId) {
            this.userId = userId;
            setUpdateOption();
        }
    }

    public long getCatchEventTimes() {
        return catchEventTimes;
    }

    public void setCatchEventTimes(long catchEventTimes) {
        if (this.catchEventTimes != catchEventTimes) {
            this.catchEventTimes = catchEventTimes;
            setUpdateOption();
        }
    }

    public List<Integer> getCricketIdList() {
        return cricketIdList;
    }

    public void setCricketIdList(List<Integer> cricketIdList) {
        this.cricketIdList = cricketIdList;
        setUpdateOption();
    }

    public int getBadgeLevel() {
        return badgeLevel;
    }

    public void setBadgeLevel(int badgeLevel) {
        if (this.badgeLevel != badgeLevel) {
            this.badgeLevel = badgeLevel;
            setUpdateOption();
        }
    }

    public long getCricketScore() {
        return cricketScore;
    }

    public void setCricketScore(long cricketScore) {
        if (this.cricketScore != cricketScore) {
            this.cricketScore = cricketScore;
            setUpdateOption();
        }
    }

    public int getScenceId() {
        return scenceId;
    }

    public void setScenceId(int scenceId) {
        if (this.scenceId != scenceId) {
            this.scenceId = scenceId;
            setUpdateOption();
        }
    }

    public Map<Integer, CricketScenceData> getScenceDataMap() {
        return scenceDataMap;
    }

    public void setScenceDataMap(Map<Integer, CricketScenceData> scenceDataMap) {
        this.scenceDataMap = scenceDataMap;
        setUpdateOption();
    }

    public Property getItems() {
        return items;
    }

    public void setItems(Property items) {
        if (null == items) {
            return;
        }
        this.items = items;
        setUpdateOption();
    }

    public long getTotalCatchTimes() {
        return totalCatchTimes;
    }

    public void setTotalCatchTimes(long totalCatchTimes) {
        if (this.totalCatchTimes != totalCatchTimes) {
            this.totalCatchTimes = totalCatchTimes;
            setUpdateOption();
        }
    }

    public int getCurrentSeasonId() {
        return currentSeasonId;
    }

    public void setCurrentSeasonId(int currentSeasonId) {
        if (this.currentSeasonId != currentSeasonId) {
            this.currentSeasonId = currentSeasonId;
            setUpdateOption();
        }
    }

    public long getRankScore() {
        return rankScore;
    }

    public void setRankScore(long rankScore) {
        if (this.rankScore != rankScore) {
            this.rankScore = rankScore;
            setUpdateOption();
        }
    }

    public CricketMatchData getCricketMatchData() {
        return cricketMatchData;
    }

    public void setCricketMatchData(CricketMatchData cricketMatchData) {
        this.cricketMatchData = cricketMatchData;
    }

    public long getWorshipTime() {
        return worshipTime;
    }

    public void setWorshipTime(long worshipTime) {
        this.worshipTime = worshipTime;
        setUpdateOption();
    }

    public int getRemainMatchTimes() {
        return remainMatchTimes;
    }

    public void setRemainMatchTimes(int remainMatchTimes) {
        if (this.remainMatchTimes != remainMatchTimes) {
            this.remainMatchTimes = remainMatchTimes;
            this.setUpdateOption();
        }
    }

    public long getLastMatchTime() {
        return lastMatchTime;
    }

    public void setLastMatchTime(long lastMatchTime) {
        this.lastMatchTime = lastMatchTime;
        setUpdateOption();
    }

    public int getTotalMatchTimes() {
        return totalMatchTimes;
    }

    public void setTotalMatchTimes(int totalMatchTimes) {
        if (this.totalMatchTimes != totalMatchTimes) {
            this.totalMatchTimes = totalMatchTimes;
            setUpdateOption();
        }
    }

    public long getDrawPieceCount() {
        return drawPieceCount;
    }

    public void setDrawPieceCount(long drawPieceCount) {
        if (this.drawPieceCount != drawPieceCount) {
            this.drawPieceCount = drawPieceCount;
            setUpdateOption();
        }
    }

    public int getDrawLevel() {
        return drawLevel;
    }

    public void setDrawLevel(int drawLevel) {
        if (this.drawLevel != drawLevel) {
            this.drawLevel = drawLevel;
            setUpdateOption();
        }
    }

    public int getDrawRewardLevel() {
        return drawRewardLevel;
    }

    public void setDrawRewardLevel(int drawRewardLevel) {
        if (this.drawRewardLevel != drawRewardLevel) {
            this.drawRewardLevel = drawRewardLevel;
            setUpdateOption();
        }
    }

    public Property getDrawReward() {
        return drawReward;
    }

    public void setDrawReward(Property drawReward) {
        if (null == drawReward) {
            return;
        }
        this.drawReward = drawReward;
        setUpdateOption();
    }

    public int getGuideBit() {
        return guideBit;
    }

    public void setGuideBit(int guideBit) {
        if (this.guideBit != guideBit) {
            this.guideBit = guideBit;
            setUpdateOption();
        }
    }

    public long getTotalOneCatchTimes() {
        return totalOneCatchTimes;
    }

    public void setTotalOneCatchTimes(long totalOneCatchTimes) {
        if (this.totalOneCatchTimes != totalOneCatchTimes) {
            this.totalOneCatchTimes = totalOneCatchTimes;
            setUpdateOption();
        }
    }

    public long getTotalTenCatchTimes() {
        return totalTenCatchTimes;
    }

    public void setTotalTenCatchTimes(long totalTenCatchTimes) {
        if (this.totalTenCatchTimes != totalTenCatchTimes) {
            this.totalTenCatchTimes = totalTenCatchTimes;
            setUpdateOption();
        }
    }

    public long getMaxRankScore() {
        return maxRankScore;
    }

    public void setMaxRankScore(long maxRankScore) {
        if (this.maxRankScore != maxRankScore) {
            this.maxRankScore = maxRankScore;
            setUpdateOption();
        }
    }

    public long getDefendFailScore() {
        return defendFailScore;
    }

    public void setDefendFailScore(long defendFailScore) {
        this.defendFailScore = defendFailScore;
        this.setUpdateOption();
    }

    public long getLastDefendFailScoreTime() {
        return lastDefendFailScoreTime;
    }

    public void setLastDefendFailScoreTime(long lastDefendFailScoreTime) {
        this.lastDefendFailScoreTime = lastDefendFailScoreTime;
        this.setUpdateOption();
    }

    public int getGuide() {
        return guide;
    }

    public void setGuide(int guide) {
        if (this.guide != guide) {
            this.guide = guide;
            this.setUpdateOption();
        }
    }

    public int getCourtRound() {
        return courtRound;
    }

    public void setCourtRound(int courtRound) {
        if (this.courtRound != courtRound) {
            this.courtRound = courtRound;
            this.setUpdateOption();
        }
    }

    public int getCourtBadgeId() {
        return courtBadgeId;
    }

    public void setCourtBadgeId(int courtBadgeId) {
        if (this.courtBadgeId != courtBadgeId) {
            this.courtBadgeId = courtBadgeId;
            this.setUpdateOption();
        }
    }

    public long getCourtBadgeExp() {
        return courtBadgeExp;
    }

    public void setCourtBadgeExp(long courtBadgeExp) {
        if (this.courtBadgeExp != courtBadgeExp) {
            this.courtBadgeExp = courtBadgeExp;
            this.setUpdateOption();
        }
    }

    public int getBuySliverToken() {
        return buySliverToken;
    }

    public void setBuySliverToken(int buySliverToken) {
        if (this.buySliverToken != buySliverToken) {
            this.buySliverToken = buySliverToken;
            this.setUpdateOption();
        }
    }

    public int getBuyGoldToken() {
        return buyGoldToken;
    }

    public void setBuyGoldToken(int buyGoldToken) {
        if (this.buyGoldToken != buyGoldToken) {
            this.buyGoldToken = buyGoldToken;
            this.setUpdateOption();
        }
    }

    public long getTokenExp() {
        return tokenExp;
    }

    public void setTokenExp(long tokenExp) {
        if (this.tokenExp != tokenExp) {
            this.tokenExp = tokenExp;
            this.setUpdateOption();
        }
    }

    public int getTokenRound() {
        return tokenRound;
    }

    public void setTokenRound(int tokenRound) {
        if (this.tokenRound != tokenRound) {
            this.tokenRound = tokenRound;
            this.setUpdateOption();
        }
    }

    public long getSkillRecycleTime() {
        return skillRecycleTime;
    }

    public void setSkillRecycleTime(long skillRecycleTime) {
        if (this.skillRecycleTime != skillRecycleTime) {
            this.skillRecycleTime = skillRecycleTime;
            this.setUpdateOption();
        }
    }

    public boolean isShowCourtRank() {
        return showCourtRank;
    }

    public void setShowCourtRank(boolean showCourtRank) {
        if (this.showCourtRank != showCourtRank) {
            this.showCourtRank = showCourtRank;
            this.setUpdateOption();
        }
    }
}
